package com.poposchool.project.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author Wang Jie
 * @Date 2022/7/6 16:27
 * @Version 1.0
 */
public interface RoleToMenuMapper {
    void insertCon(@Param("roleId") Integer roleId,@Param("menuIds") List<Integer> menuIds);

    @Delete("delete from sys_role_menu where role_id = #{role_id}")
    void deleteRoleById(Integer role_id);

    @Select("select menu_id from sys_role_menu where role_id = #{role_id}")
    List<Integer> getRoleMenu(Integer roleId);

}
